package com.eapt.dao;

import java.io.Serializable;

import com.eapt.vo.EdsLogis;
import com.stony.core.dao.HibernateDataAccessObject;
import com.stony.core.util.SEQUtils;

public class EdsLogisDAO extends HibernateDataAccessObject {

	public EdsLogisDAO(){

		super(EdsLogis.class);

	}

	protected void onDeleteTrigger(Object object) {
		super.onDeleteTrigger(object);
	}

	protected void onSaveOrUpdateTrigger(Object object) {
		super.onSaveOrUpdateTrigger(object);
	}

	protected void onSaveTrigger(Object object) {
		super.onSaveTrigger(object);
	}

	protected void onUpdateTrigger(Object object) {
		super.onUpdateTrigger(object);
	}
	
	public Long save(Serializable object) {
		EdsLogis vo = (EdsLogis) object;
		vo.setEdslogisno(SEQUtils.getNextval("SEQ_EDS_LOGIS"));
		return super.save(vo);
	}
	
	public void saveOrUpdate(Serializable object) {
		EdsLogis vo = (EdsLogis) object;
		if (vo.getEdslogisno() == null) {
			vo.setEdslogisno(SEQUtils.getNextval("SEQ_EDS_LOGIS"));
		}
		super.saveOrUpdate(vo);
	}
}